package pers.sen.health.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import pers.sen.health.entity.QueryPageBean;
import pers.sen.health.entity.Result;
import pers.sen.health.service.SetMealService;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/11/10 17:30
 * @Description TODO
 */
@RestController
public class SetMealController {
    @Reference
    private SetMealService setMealService;

    @GetMapping("setmeal/findAll")
    public Result findAll() {
        return new Result(setMealService.list());
    }

    @GetMapping("setmeal/findSetMealDetail/{id}")
    public Result findSetMealDetail(@PathVariable("id") int id){
        return new Result(setMealService.findSetMealDetailById(id));
    }

    @GetMapping("setmeal/findSetMealById/{id}")
    public Result findSetMealById(@PathVariable("id") int id){
        return new Result(setMealService.findSetMealById(id));
    }

}
